#!/usr/bin/env bash

image_file_name="sd_card.img"

if [ -f $image_file_name ]
then
	echo "$image_file_name found."
else
	echo "$image_file_name not found. A new one will be created now..."
	qemu-img create -f qcow2 $image_file_name 512M
	/sbin/mkfs.vfat $image_file_name
fi

./scripts/qemu/auto_qemu \
	-drive if=sd,format=raw,file=$image_file_name \
	"$@"
#./scripts/qemu/auto_qemu \
#	-drive id=sd1,format=raw,file=$image_file_name \
#	-device sd-card,drive=sd1 \
#	$@


